how to calculate running time in python

39

how to calculate running time in python -

import timeit

start = timeit.default_timer()

#Your statements here

stop = timeit.default_timer()

print('Time: ', stop - start)

Comments

Submit
0 Comments